import common from './common.js';
const weixin = {}

weixin.toMiniGame = function(appId) {
	if (!common.isNull(wx) && common.isTypeFunc(wx.navigateToMiniProgram)) {
		wx.navigateToMiniProgram({
			appId: appId,
		});
	}
}

weixin.setClipboard = function(clipboardData) {
	if (!common.isNull(wx) && common.isTypeFunc(wx.setClipboardData)) {
		wx.setClipboardData({
			data: clipboardData,
			success(res) {
				common.showToast('复制成功');
			}
		});
	}
}

export default weixin;
